<include file="public@agent_header"/>
</head>
<body>
	<div class="wrap">
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('customer_service/edit')}">
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>订单编号</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" value="{$row.order_no}" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>销售组织</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" value="{:factory_name($row.sale_number)}" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>业务员</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" value="{$row.staff_number}({$row.staff_name})" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>下单时间</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" value="{$row.create_time}" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>出货工厂</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" value="{$row.factory_name}" readonly>
				</div>
			</div>
			<div class="form-group">
	            <label class="col-sm-2 control-label"><span class="form-required"></span>产品</label>
	            <div class="col-md-6 col-sm-10">
	                <table class="table table-hover table-bordered">
	                    <thead>
	                        <tr>
	                            <th>产品</th>
	                            <th>数量</th>
	                            <th>售价</th>
	                            <th>基本价</th>
	                            <th>运费</th>
	                            <th>利息</th>
	                            <th>议价</th>
	                        </tr>
	                        <foreach name="row.product" item="vo">
	                            <tr>
	                            	<input type="hidden" name="product[{$key}][id]" value="{$vo.id}">
	                                <td>{$vo.wuliao}({$vo.baozhuang}KG)</td>
	                                <td>
	                                	<input type="text" class="form-control" name="product[{$key}][weight]" value="{$vo.weight}">
	                                </td>
	                                <td>{$vo.price+$vo.freight+$vo.interest+$vo.yijia}</td>
	                                <td>{$vo.price}</td>
	                                <td>
	                                	<input type="text" class="form-control" name="product[{$key}][freight]" value="{$vo.freight}">
	                                </td>
	                                <td>
	                                	<input type="text" class="form-control" name="product[{$key}][interest]" value="{$vo.interest}">
	                                </td>
	                                <td>
	                                	<input type="text" class="form-control" name="product[{$key}][yijia]" value="{$vo.yijia}">
	                                </td>
	                            </tr>
	                        </foreach>
	                    </thead>
	                </table>
	            </div>
	        </div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>约定发货日</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control js-bootstrap-datetime" name="fahuo_date" value="{$row.fahuo_date}" autocomplete="false">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>约定收款日</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control js-bootstrap-datetime" name="shoukuan_date" value="{$row.shoukuan_date}" autocomplete="false">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>付款方式</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" value="{$row.pay_type}" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>付款账期</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" value="{$row.pay_account}" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>特别交代</label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control">{$row.remarks}</textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{$row.id}" />
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>